#include "main.h"
#define USART3_LEN 2048
typedef struct {
	uint16_t RX_Size;          //receive length
	uint8_t RX_pData[USART3_LEN]; //DMA receive buffer
} USART3_RECEIVETYPE;
extern USART3_RECEIVETYPE Usart3_Type;
extern USART3_RECEIVETYPE usart3_rx;

/**********************************************/
#define PARA_TYPE		2
#define TEM_BUFF_LEN	64
typedef struct {
	uint32_t node_num;
	char node_name[TEM_BUFF_LEN];
	char productKey[TEM_BUFF_LEN];
	char deviceName[TEM_BUFF_LEN];
	char deviceSecret[TEM_BUFF_LEN];
} para_element;
/**********************************************/
#define PARA_ELE_NUM	5
typedef struct {
	para_element para_element_st;
	para_element para_element_bk_st;
} para_node;
/**********************************************/
#define PARA_NODE_NUM 	20
typedef struct {
	para_node para_node_st[PARA_NODE_NUM];
} para;
extern para para_st;
/**********************************************/
void USART3_RxIdleCallback(UART_HandleTypeDef *huart);

void para_initial(void);
void usart3_rx_deal(USART3_RECEIVETYPE *usart3_rx);
